//
//  Application.h
//  MHO
//
//  Created by papo on 2/17/14.
//  Copyright (c) 2014 maihoang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NSString+HTML.h"

@interface Application : NSObject

@property (nonatomic, strong) NSString* appId;
@property (nonatomic, strong) NSString* appName;
//@property (nonatomic, strong) NSString* description;
@property (nonatomic, strong) NSString* detail;
@property (nonatomic, strong) NSString* detailHtml;
@property (nonatomic, strong) NSString* descHtml;
@property (nonatomic, strong) NSString* imagePath;
@property (nonatomic, strong) NSString* logoPath;
@property (nonatomic, strong) NSString* plist;
//@property (nonatomic, strong) NSString* ;
@property (nonatomic, strong) NSString* appPlatformId;
@property (nonatomic, strong) NSString* appPlatformName;
@property (nonatomic, strong) NSString* urlHomePage;
@property (nonatomic, strong) NSString* publisherId;
@property (nonatomic, strong) NSString* publisherName;
@property (nonatomic, assign) NSInteger totalVote;
@property (nonatomic, assign) NSInteger totalPoint;
@property (nonatomic, assign) NSInteger totalComment;
@property (nonatomic, assign) NSInteger totalDownload;
@property (nonatomic, retain) NSString* size;
@property (nonatomic, strong) NSString* view;
@property (nonatomic, strong) NSString* pictureAlbum;
@property (nonatomic, strong) NSString* file;
@property (nonatomic, strong) NSMutableArray*   pictureAlbumUrls;
@property (nonatomic, strong) NSString* versionApp;
@property (nonatomic, assign) NSInteger rate;
@property (nonatomic, assign) NSInteger like;

// Static Methods
+ (Application*)appFromDictionary:(NSDictionary*)dict;
+ (NSArray*)appsFromServiceUrl:(NSString*)url;
+ (NSArray*)getGameHot;
+ (NSArray*)getGameTopGroup:(NSInteger)group count:(NSInteger)count;
+ (BOOL)updateViewCountForId:(NSString*)appID;
+ (BOOL)updateDownloadCountForId:(NSString*)appId;

+ (BOOL)sendRate:(NSString*)appId rate:(NSInteger)rate;

- (BOOL)sendRate:(NSInteger)rate;

+ (Application*)appDetail;

- (id)initWithDictionary:(NSDictionary*)dict;

@end
